/*
 * LEDDisplay.h
 *
 * This class models the LED Display that displays the
 * all the data provided by the cyclometer device
 *
 * Author: Zachary Masiello
 * Author: Peter-John Rowe
 */

#ifndef LEDDISPLAY_H_
#define LEDDISPLAY_H_

#include "SegmentPort.h"
#include "AnodePort.h"

class LEDDisplay
{
public:
	// Constructor
	LEDDisplay(SegmentPort *, AnodePort *);
	// Destructor
	virtual ~LEDDisplay();
	// For thread to controls the output of the LED Display
	static void* run(LEDDisplay *);
	// Sets the display values for the next output that should be displayed
	void setDisplay(int, int, int, int);
private:
	// IOPort interface for the segments on the Seven Segment Display
	SegmentPort *segmentPort;
	// IOPort interface for the anodes on the seven segment display
	AnodePort *anodePort;
	// Stored value for anode 0
	int display0;
	// Stored value to be displayed for anode 1
	int display1;
	// Stored value to be displayed for anode 2
	int display2;
	// Stored value to be displayed for anode 3
	int display3;
};

#endif /* LEDDISPLAY_H_ */
